from web_ui.frame.pages.base_page import BasePage
from web_ui.frame.utils.repeat_click import repeat_click
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait


class CreatePage(BasePage):

    def input_info(self, name):
        self.do_send_keys(f"{name}", (By.CSS_SELECTOR, ".el-input__inner"))
        WebDriverWait(self.driver, 10).until(repeat_click(By.XPATH, "//*[text()='确定']"))

        from web_ui.frame.pages.mall_manage.list_page import ListPage
        return ListPage(self.driver)
